# import pymysql
# #连接数据库
# db = pymysql.Connection(
#     host='127.0.0.1',
#     port=3306,
#     user='root',
#     passwd='root',
#     db='motosycle',
#     charset='utf8'
# )
# #获取链接对象
# cur = db.cursor()
# #执行sql
# cur.execute("select * from product_cc")
# #获取结果集
# results = cur.fetchall()
# #遍历结果集
# for i in results:
#     print(i)
# #释放资源
# cur.close()
# db.close()


import http.client

conn = http.client.HTTPSConnection("www.shopbmwmotorcycles.com")
conn.timeout = 60000
payload = ''
headers = {
  'Cookie': 'ASP.NET_SessionId=jblt2gja5wcuapyed54at021',
  'Host': 'www.shopbmwmotorcycles.com'
}
conn.request("GET", "/BMW_2020_S1000XR.html", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
